﻿using CleanArchitecture.Infrastructure.Entities.Business;
using CleanArchitecture.Infrastructure.Entities.Common;
using System.Collections.Generic;

namespace CleanArchitecture.Infrastructure.Interfaces.Business
{
    public interface IActiveLogService
    {
        /// <summary>
        /// Inserts a log item
        /// </summary>
        /// <returns>A log item</returns>
        void InsertLog(ActiveLog logitem);
        /// <summary>
        /// 统计最近7天文章浏览量
        /// </summary>
        /// <returns></returns>
        IDictionary<string, int> StatisticsNewsVistCountWithin7Days();
        /// <summary>
        /// 统计文章访问量
        /// </summary>
        /// <returns></returns>
        int StatisticsNewsVistCount();
        /// <summary>
        /// 通过分页查询获取到的文章ID统计查询每篇文章的访问量,及每篇文章的点击数量
        /// </summary>
        /// <param name="newsids"></param>
        /// <returns></returns>
        IList<PageVisitQuery> StatisticsNewsCountsByNewsIds(int[] newsids);
        /// <summary>
        /// 统计最近7天博客文章浏览量
        /// </summary>
        /// <returns></returns>
        IDictionary<string, int> StatisticsBlogVistCountWithin7Days();
        /// <summary>
        /// 通过分页查询获取到的博客ID统计查询每篇博客的访问量,及每篇博客的点击数量
        /// </summary>
        /// <param name="blogids"></param>
        /// <returns></returns>
        IList<PageVisitQuery> StatisticsBlogCountsByBlogIds(int[] blogids);
    }
}
